<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use app\common\lib\UploadFile;
use think\facade\Route;

Route::get('/', function () {
    return redirect('manage');
});

Route::post('/test/upload', function () {
    $uploadFile = new UploadFile();
    $params = [
        'path' => 'invoice',
        'fileField' => 'file'
    ];
    $res = $uploadFile->upload($params, ['gif', 'png', 'jpg', 'jpeg', 'pdf'], 1024);
    return apiResponse($res['status'], $res['msg'], $res['data']);
});






